<?php
$con = mysqli_connect(
    "127.0.0.1",
    "root",
    "310831",
    "fatie"

);

$sql = "select * from demo01";
$result = mysqli_query($con, $sql);
$data_arr = array();
while($row = mysqli_fetch_array($result)){
    array_push($data_arr, $row);
}
mysqli_close($con);
echo json_encode($data_arr);
?>
